home *** CD-ROM | disk | FTP | other *** search
- Hi everyone,
-
- I thought I would send this message to the mailinglist as it may be of
- interest to you all. It's from a discussion I and Doug have, and I don't think
- he would mind if I send it to you all. Ignore my stupied questions as I know
- as much about 3D graphics like a frog, but the anwers might be of interest.
-
- I can also add from another letter I received from Doug that when he had
- recoded 60% of the code he hade increased the speed with around a factor 3.
- But as he says in this letter he have found some problems.
-
- >> e> Have you tried the program? It will work with the demo version
- >> e> WAD of Doom I. It's not fast, but quite nice. :-)
- >>
-
- >> Not only tried it, but rewritten most of it too. Very crap code
- >> horrible to read and slow ashell.
-
- e> :-) I have been talking to Laurent, and it is like you said
- e> disassembled c-code, but the most part is rewritten and alot of it is
- e> not used at all. Laurent only "forgot" to delete it. He have also done
- e> a new version with only assembler code and deleted all the old c-code,
- e> but you have already done that.
-
- Yes, but I have discovered a more serious problem - the optimisations they
- have made have damaged the printing order to the point where you get bits
- of 'floor' in the 'roof' and vice versa - but only in very specific places.
- I will have to reverse-engineer this and get the algorithm back in working
- order before I can continue speeding it up - most of the optimisations made
- so far (but not all) have been trivial and are not going to boost the speed
- by much. It needs rebuilt from the gound up.
-
- I still don't think I have anything close to a recent version, but it
- doesn't matter now since we have solved most of the puzzles - and we can
- rebuild from this data. Thanks for the textfiles! They were useful!
-
- >> A lot of work needs to be done, but it's just possible we can get it
- >> going fast! :)
-
- e> YESSS, this is what I want to hear!!! YYYEEESSS!!!! Have you speeded
- e> it up anything already? I want to know! :-)
-
- Yes, but we had to stop this when we realised that some of the previous
- optimisations had damaged the drawing process. I'm trying to fix this right
- now.
-
- >> One serious problem though - all the coordinates are integer-based.
- >> This means low accuracy, and the texturemapping will suffer when it is
- >> put in.
- >> I will need to replace all the 16-bit integer maths with fixed-point 32-
- >> bit stuff. I also fixed a hell of a lot of bugs caused when they converted
- >> the 'C' to assembly - which caused garbage to appear in certain rooms
- >> with large WAD files.
-
- >> :-) Great! Will the 32 bit integer stuff slow down the game? Isn't it
- >> going to be faster with just 16 bit?
-
- No - with 3D, things don't work like that. The idea is that you increase
- the amount of arithmetic and mathematical routines (making it a little bit
- slower as a result) in order to make more exhaustive calculations - which
- increases visual accuracy and lets you make highly accurate decisions about
- what you can discard (the stuff you can't see directly in front of you).
- This makes it MUCH MUCH faster than any optimisation can
- achieve.
-
- One of the optimisations I have made is checking to see of a 'node' (a
- 'sector' or 'sub-room' - like a doorpost etc.) is hidden behind a door,
- wall or object, and then discarding that entire part of the BSP tree, as
- anything 'inside' the 'node' must be invisible if the node ITSELF is
- invisible. This makes a huge difference in corridors and rooms (as it
- doesn't then calculate stuff behind solid walls), and doesn't take very
- long to do.
-
- This is what I was trying to explain to Laurent - optimising assembly can
- be damaging on it's own (makes things harder to modify later) and doesn't
- offer great rewards in speed. You must first develop a system that is
- PROCEDURALLY fast - then optimise when you are happy with it.
-
- I don't think Laurent believes that this approach is worth very much, as he
- is used to writing demos and stuff in assembly, and isn't much interested
- in algorithms - but I have used both for quite some time now - and I do get
- good results from better algorithms.
-
- The layout of the program is also all wrong - the 68030 cache is not being
- used at all and that is going to make things half as fast as they could be
- straight away!
-
- >> Anyway, I'd better get back to it, as there's much to do...
-
- e> Heh... keep coding, but don't kill your self. :-) You are to much
- e> needed for that. :-)
-
- I have to do as much as possible just now, as I might not get much time on
- it later - I have Apex 3 to work on and the game still needs finished off
- very soon.
-
- >> Bye!
-
- e> Bye! I will love this!!! :-)
-
- I hope so - the program is behaving a lot better now, but could still be
- made a lot faster!
-
- Doug.
-
- ┌───────────────────────────────────────────────────────────────────────┐
- │ Black Scorpion Software Developments ≡≡≡≡≡≡≡ Falcon030 & Jaguar
- │
- ├───────────────────────────────────────────────────────────────────────┤
- │ Doug Little ≡ Neil Stewart ≡ Nick Hesketh ≡ Dave Encill
- │
- └───────────────────────────────────────────────────────────────────────┘
-
-